<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>运输信息</title>

    <link rel="stylesheet" href="../../static/layui/css/layui.css">
    <link rel="stylesheet" href="../../static/css/main.css">
    <link rel="stylesheet" href="../../static/css/public.css">

    <script src="../../static/js/jquery-3.4.1.min.js"></script>
    <script src="../../static/layui/layui.js"></script>

    <script src="../../static/js/allroute.js"></script>

</head>

<body>

<div class="er">
    <ul class="layui-nav layui-bg-cyan" id="top-nav">
        <li class="layui-nav-item">
            <a href="">首页</a>
        </li>
        <li class="layui-nav-item">
            <a href="">个人中心<span class="layui-badge-dot"></span></a>
        </li>
        <li class="layui-nav-item">
            <a href="#"><img src="../../static/images/2019-08-07/f8aa0870-e4ea-4170-9772-296204476267.jpg"
                             class="layui-nav-img"
                             text="'你好，'+${session.user.username}"></a>

        </li>
        <li class="layui-nav-item">
            <a href="">退出登录</a>

        </li>
    </ul>


</div>
<div class="left">
    <ul class="layui-nav layui-nav-tree  layui-nav-side" lay-filter="test" id="left">
        <li class="layui-nav-item" style="height: 60px"><a href="#" style="font-size:18px;font-family: 'Century Gothic';color: #bce8f1">suda物流系统
            </a></li>
        <li class="layui-nav-item layui-nav-itemed">
            <a href="javascript:;">物流信息</a>
            <dl class="layui-nav-child">
                <dd><a href="../order/allorder.html" target="_top">订单列表</a></dd>
                <dd><a href="../package/allpackage.html" target="_top">包裹信息</a></dd>
                <dd><a href="../route/allroute.html" target="_top">运输信息</a></dd>
                <dd><a href="../store/allstore.html" target="_top">存储信息</a></dd>
                <dd><a href="../vehicle/allvehicle.html" target="_top">运输工具信息</a></dd>
            </dl>
        </li>
        <li class="layui-nav-item layui-nav-itemed">
            <a href="javascript:;">物流管理</a>
            <dl class="layui-nav-child">
                <dd><a href="../staff/allstaff.html" target="_top">员工列表</a></dd>

                <dd><a href="../warehouse/allwarehouse.html" target="_top">仓库列表</a></dd>

                <dd><a href="../customer/allcustomer.html" target="_top">顾客列表</a></dd>
            </dl>
        </li>
    </ul>

</div>

<div class="table">
    <div class="layui-row">
        <div class="layui-col-md6">
            <h2 class="tablename">运输信息表</h2>
        </div>
        <div class="layui-col-md6">
            <form class="layui-form" style="margin-top: 10px; margin-left: 60px;">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label t" style="width: 100px">搜索运输信息:</label>
                        <div class="layui-input-inline">
                            <input class="layui-input" lay-verify="search" placeholder="请输入运输编号查询" name="routeId"
                                   id="routeId" autocomplete="off">
                        </div>
                    </div>
                    <button style="margin-bottom: 5px;" class="layui-btn" lay-submit lay-filter="*">搜索</button>
                </div>
            </form>
        </div>
        <hr class="layui-bg-gray">
        <table class="layui-hide" id="demo" lay-filter="test"></table>
    </div>
</div>

<div class="layui-footer" style="margin-top: 75px">
    <!-- 底部固定区域 -->
    <div class="bottom_left">
        <ul class="ul1">
            <li><a href="javascript:;">首页&nbsp;&nbsp;|&nbsp;</a></li>
            <li><a href="javascript:;">站点情况&nbsp;&nbsp;|&nbsp;</a></li>
            <li><a href="javascript:;">物流信息&nbsp;&nbsp;|&nbsp;</a></li>
            <li><a href="javascript:;">物流管理&nbsp;&nbsp;|&nbsp;</a></li>
            <li><a href="javascript:;">操作管理&nbsp;&nbsp;|&nbsp;</a></li>
            <li><a href="javascript:;">权限管理</a></li>

        </ul>
        <br> <br>
        <p>版权所有 Copyright &copy; 2021 皖ICP@Sun_Wangping</p>
        <p>技术支持： braisedPanda</p>
        <br>
    </div>

</div>


<script type="text/html" id="barDemo">
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail" >查看</a>

    <a class="layui-btn layui-btn-xs" lay-event="edit" id="edit">编辑</a>

    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>

</script>

<script type="text/html" id="toolbarDemo">
    <div class="layui-inline" lay-event="add">
        <i class="layui-icon layui-icon-add-1"></i>
    </div>
    <div class="layui-inline" lay-event="update">
        <i class="layui-icon layui-icon-edit"></i>
    </div>
    <div class="layui-inline" lay-event="delete">
        <i class="layui-icon layui-icon-delete"></i>
    </div>
    <div class="layui-inline" lay-event="search">
        <i class="layui-icon layui-icon-search"></i>
    </div>
    <div class="layui-inline" lay-event="refresh">
        <i class="layui-icon layui-icon-refresh"></i>
    </div>
</script>

<script>
    layui.use('element', function () {
        var element = layui.element;

        //…
    });

    layui.use(['form'], function () {
        var form = layui.form

        form.verify({
            search: function (value) {
                if (value.length == 0) {
                    return '至少得输入一个编号啊';
                }
            }
        });

        form.on('submit(*)', function () {
            $.ajax({
                url: 'http://localhost:8080/route/' + document.getElementById('routeId').value,
                type: 'GET',
                success(res) {
                    if (res.code == 0) {
                        if(res.data != null)routedetail(res.data);
                        else layer.msg("暂无该运输信息", {icon: '2', time: 2000});
                    } else layer.msg("修改失败", {icon: '2', time: 2000});
                },
                error() {
                    layer.msg('500！', {
                        time: 1000, //不自动关闭
                        icon: 'layui-icon-ok',
                    });
                }
            })
            return false;
        });
    });

</script>

</body>

</html>